function [s_Yres, s_Xres] = TideInterp(s_Xres, s_Yres, s_Xresnew)
%function [s_Yres, s_Xres] = TideInterp(s_Xres, s_Yres, s_Xresnew)
%
%s_Yresults = struct( ...
%        'signal', signal ...
%    ,   'residual', residual ...
%    ,   'tidepred', tidepred ...
%    ,   'amplitude', tidecon(:,1) ...
%    ,   'phase', tidecon(:,3) ...
%);
%
%s_Xresults = struct( ...
%        'freqname', freqname ...
%    ,   'freq', freq ...
%    ,   'time', time ...
%    ,   'startdate', startdate ...
%    ,   'dt', dt ...
%);

s_Yres.signal = interp1(s_Xres.time, s_Yres.signal, s_Xresnew.time);
s_Yres.residual = interp1(s_Xres.time, s_Yres.residual, s_Xresnew.time);
s_Yres.tidepred = interp1(s_Xres.time, s_Yres.tidepred, s_Xresnew.time);
s_Xres.time = s_Xresnew.time;